-
Notifications
You must be signed in to change notification settings - Fork 844
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[EuiDatePicker] Handle invalid selected
moment formats
#7784
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
+ show the invalid icon/indicator automatically if the moment date is invalid
…lid selected date
mgadewoll
approved these changes
May 23, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚢 🐈⬛ Nice fix! And the updated code works as expected 👍
tkajtoch
reviewed
May 23, 2024
This reverts commit e357261.
Preview staging links for this PR:
|
💚 Build Succeeded
History
cc @cee-chen |
tkajtoch
added a commit
to elastic/kibana
that referenced
this pull request
May 29, 2024
`v94.5.1` ⏩ `v94.5.2` _[Questions? Please see our Kibana upgrade FAQ.](https://github.com/elastic/eui/blob/main/wiki/eui-team-processes/upgrading-kibana.md#faq-for-kibana-teams)_ --- ## [`v94.5.2`](https://github.com/elastic/eui/releases/v94.5.2) **Bug fixes** - Fixed `EuiDatePicker` to more gracefully handle incorrectly formatted `selected` Moment dates, instead of simply crashing ([#7784](elastic/eui#7784)) - Fixed `EuiFlexGroup` and `EuiFlexItem` types to correctly accept global attribute props and simplify type resolution when used with `styled()`-like wrappers ([#7792](elastic/eui#7792))
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
@shahzad31 reported this issue to us in Slack - passing an invalid
moment()
date to theselected
prop causes a maximum update depth exceeded React error. We should be more gracefully handling and alerting consumers to this issue without just blanket crashing JS.QA
Invalid date
value (with danger icon/coloring)General checklist
- [ ] Checked in both light and dark modes- [ ] Checked in mobileand cypress tests- [ ] If applicable, added the breaking change issue label (and filled out the breaking change checklist)